package com.scs.application.modules.sys.dto;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * @Description:字典类DTO
 */
@Data
@Accessors(chain = true)
public class DictDTO {

    @JSONField(ordinal = 0)
    private String id;

    @JSONField(ordinal = 1)
    private String code;

    @JSONField(ordinal = 2)
    private String name;

    @JSONField(ordinal = 3)
    private String description;

    @JSONField(ordinal = 4)
    private List<DictDataDTO> dictDataDTOS;

    @Data
    @Accessors(chain = true)
    public static class DictDataDTO {

        @JSONField(ordinal = 0)
        private String id;

        @JSONField(ordinal = 1)
        private String dictTypeId;

        @JSONField(ordinal = 2)
        private String dictTypeCode;

        @JSONField(ordinal = 3)
        private String value;

        @JSONField(ordinal = 4)
        private String label;

        @JSONField(ordinal = 5)
        private Integer sort;

        @JSONField(ordinal = 6)
        private String color;
    }
}
